package com.bjpowernode.service.impl;
import com.bjpowernode.dao.UserDao;
import com.bjpowernode.service.UserService;
public class UserServiceImpl implements UserService {
    // 引用类型,在XML配置中使用ref给属性赋值,同时该类必须提供set方法
    private UserDao userDao;

    // 为配置文件提供set注入的要求
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public int addUser(String name,Integer age) {
        return userDao.addUser(name,age);
    }
}
